/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fidus;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author dahoe
 */
public class Movie {

    public String title;
    public String type;
    public String genre;
    public int year;
    public int id;
    public double price;

    public Movie(String title, String type, String genre, int year, double price) {
        this.title = title;
        this.type = type;
        this.genre = genre;
        this.year = year;
        this.price = price;
    }

    public Movie(ResultSet movies) throws SQLException {
        this.title = movies.getString("Title");
        this.type = movies.getString("type");
        this.genre = movies.getString("genre");
        this.year = movies.getInt("Year");
        this.id = movies.getInt("id");
        this.price = movies.getDouble("Price");
    }
}
